package factoryMethod;

/**
 * Created by 王念 on 2016/3/30.
 */
public class SendFactory {

    public static Sender produce(String type){
        if("maill".equals(type)){
            return new MaillSender();
        }else if("sms".equals(type)){
            return new SmsSender();
        }else{
            return null;
        }

    }
}
